/*
 * @Author: upp24 1246815351@qq.com
 * @Date: 2023-07-05 09:45:14
 * @LastEditors: upp24 1246815351@qq.com
 * @LastEditTime: 2024-01-20 09:51:13
 * @FilePath: /pure-admin-thin-i18n/src/api/vip.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE/
 */
import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";
export type BannerResult = {
  page: number;
  pagesize: number;
  success: boolean;
  code: number;
  token: string;
  msg: string;
  data: {
    img(img: any): string;
    data: any[];
    total: number;
    page: number;
    pagesize: number;
  };
};
/**会员列表*/
export const vipList = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("user/list"), {
    data
  });
};
/**会员修改 */
export const vipEdit = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("user/update"), {
    data
  });
};
/**会员查看 */
export const vipView = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("user/team"), {
    data
  });
};
/**获取会员token */
export const vipToken = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("user/skip"), {
    data
  });
};
/**会员跳转info*/
export const vipInfo = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("user/info"), {
    data
  });
};
/**会员删除 */
export const vipSet = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("user/setoff"), {
    data
  });
};
/**人数统计 */
export const vipCount = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("user/place"), {
    data
  });
};

/**团队订单 */
export const vipOrder = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("user/teamIndent"), {
    data
  });
};

/**修改推荐人 */
export const vipReferrer = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("user/updateSugg"), {
    data
  });
};

/**点位修正 */
export const vipFix = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("user/correct"), {
    data
  });
};

/**店铺信息*/
export const vipShop = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("company/list"), {
    data
  });
};

/**查看父级 */
export const vipParent = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("user/father"), {
    data
  });
};
